// onTouchMove(event: EventTouch) {
//     const {width: bgW, height: bgH} = this.backgroundNode.getComponent(UITransform).contentSize
//     const backgroundPos = this.backgroundNode.getPosition();
//     const ratio = window.devicePixelRatio
//     let {width: vw, height: vh} = view.getViewportRect()
//     console.log("🚀 ~ CameraControl ~ onTouchMove ~ view.getViewportRect():", view.getViewportRect())
//     // 转换为世界坐标系的边界
//     const minX = backgroundPos.x;
//     const minY = backgroundPos.y;
//     const maxX = backgroundPos.x + bgW/ratio;
//     const maxY = backgroundPos.y + bgH/ratio;
//     const maxMY = maxY - vh;
//     const maxMX = maxX - vw;

//     const cameraPos = this.camera.node.getPosition();
//     let newCameraPos = cameraPos.clone();
//     newCameraPos.x =newCameraPos.x + event.getDeltaX() * this.moveSpeed
//     newCameraPos.y =newCameraPos.y + event.getDeltaY() * this.moveSpeed
//     newCameraPos.x = Math.max(minX, Math.min(newCameraPos.x, maxMX));
//     newCameraPos.y = Math.max(minY, Math.min(newCameraPos.y, maxMY));

//     this.camera.node.setPosition(newCameraPos);
// }